﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowSizeTool
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            //this.Size = new Size(2040, 300);
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            UpdateCurrentSize();
            UpdateCurrentLocation();

            labelVirtaulScreen.Text = "Virtual Screen: " + SystemInformation.VirtualScreen.Size.ToString();
            labelPrimaryMonitorSize.Text = "Primary Monitor Size: " + SystemInformation.PrimaryMonitorSize.ToString();
        }

        private void Form1_Resize(object sender, EventArgs e)
        {
            UpdateCurrentSize();
        }

        void UpdateCurrentSize()
        {
            labelCurrentSize.Text = "Current Size: " + this.Size.ToString();
        }

        void UpdateCurrentLocation()
        {
            labelCurrentLocation.Text = "Current Location: " + this.Location.ToString();
        }

        private void Form1_Move(object sender, EventArgs e)
        {
            UpdateCurrentLocation();
        }
    }
}
